package model;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class Wrapper extends Thread{
	
	HashMap<String, Integer> calcData;
	List<String> inputDatas;
	HashMap<String, Integer> rank;
	public Wrapper(){;}
	
	public Wrapper(List<String> inputDatas){
		calcData = new HashMap<String, Integer>();
		this.inputDatas = inputDatas;
		this.rank = new HashMap<String, Integer>();
		
	}
	
	public void run(){
		super.run();
		for(String data : inputDatas){
			if(calcData.containsKey(data)){
				int a = calcData.get(data);
				calcData.put(data, a+1);
			}else{
				calcData.put(data, 1);
			}
		}
		
		System.out.println(calcData);
	}
	
	public HashMap<String, Integer> getRank(){ return calcData;	}
	
}
